package cn.s1995.sloth.bizs.oo.dto;

import cn.s1995.sloth.common.core.convert.JoinUrlPrefixConvert;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * ShopCartOrderDTO
 *
 * @author Lex
 * @description
 * @date 2023/12/26 18:42
 */
@Data
@Schema(description = "单个店铺的订单信息")
public class ShopCartOrderDTO implements Serializable {
    @Schema(description = "店铺id", required = true)
    private Long shopId;

    @Schema(description = "店铺名称", required = true)
    private String shopName;

    @Schema(description = "店铺头像", required = true)
    @JsonSerialize(using = JoinUrlPrefixConvert.class)
    private String shopAvatar;

    @Schema(description = "实际总值", required = true)
    private BigDecimal actualTotal;

    @Schema(description = "商品总值", required = true)
    private BigDecimal total;

    @Schema(description = "商品总数", required = true)
    private Integer totalCount;

    @Schema(description = "运费", required = true)
    private BigDecimal transfee;

    @Schema(description = "促销活动优惠金额", required = true)
    private BigDecimal discountReduce;

    @Schema(description = "优惠券优惠金额", required = true)
    private BigDecimal couponReduce;

    @Schema(description = "店铺优惠金额(促销活动 + 优惠券 + 其他)", required = true)
    private BigDecimal shopReduce;

    @Schema(description = "订单备注信息", required = false)
    private String remarks;

    @Schema(description = "购物车商品", required = true)
    private List<ShopCartItemDiscountDTO> shopCartItemDiscounts;

    @Schema(description = "整个店铺可以使用的优惠券列表", required = true)
    private List<CouponOrderDTO> coupons;

    @Schema(description = "订单id", required = true)
    private Long orderId;
}
